package com.zxy.ziems.server.device.pojo.dto;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Null;
import lombok.Data;

/**
 * 协议管理
 * @author 10348359
 * @create 2024-03-25 11:10
 */
@Data
public class ProtocolDTO {
    /**
     * 主键
     */
    @Null(message = "ID必须为空", groups = {Add.class})
    @NotBlank(message = "ID不能为空", groups = {Delete.class, Update.class})
    private String id;

    /**
     * 编码
     */
    @NotBlank(message = "编码不能为空", groups = {Add.class, Update.class})
    private String code;

    /**
     * 协议名称
     */
    @NotBlank(message = "协议名称不能为空", groups = {Add.class, Update.class})
    private String name;
    /**
     * 协议描述
     */
    private String description;

    public interface Add{}
    public interface Update{}
    public interface Delete {}
}
